# 循环

# num = 1
#
# while num <= 10:
#     print(num)
#     num += 1

# num = 1
# sum = 0
#
# while num <= 5:
#     i = 1
#     mulsum = 1
#     while i <= num:
#         mulsum += i
#         i += 1
#     num += 1
#     sum += mulsum
#
# print(f'5的阶乘和 {sum}')


# range：内建函数 前闭后开[...), 第三个参数是步长
# for i in range(1, 11, 2):
#     print(i)
# TheSum = 0
# for i in range(10, 0, -1):
#     TheSum += i
#
# print(TheSum)

#
# for i in range(1, 6):
#     if i == 3:
#         continue
#     print(f"吃第 {i} 个包子")


Thsum = 0
count = 0
while True:
    num = input("请输入一个数字（分号表示结束）")
    if(num == ';'):
        break
    num = float(num)
    Thsum += num
    count += 1

print(f'平均值为：{Thsum / count}')